package com.huafeng.model.base;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * @author 花风
 * @date 2023/8/15 19:38
 * @Description 基础实体类
 */
@Data
public class BaseEntity {
    @TableId(type = IdType.AUTO)
    @Excel(name = "编号",orderNum = "0",width = 3,isImportField = "true")
    private Long id;

    @TableField("create_time")
    @Excel(name = "操作时间",orderNum = "13",format = "yyyy-MM-dd",width = 20,isImportField = "true")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date createTime;

    @TableField("update_time")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date updateTime;

    @TableLogic
    @TableField("is_deleted")
    private Integer isDeleted;

    @TableField(exist = false)
    private Map<String,Object> params = new HashMap<>();
}
